package com.mxx.bu_yang.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.mxx.bu_yang.R;
import com.mxx.bu_yang.response.WarehouseResponse;

import org.jetbrains.annotations.NotNull;

/**
 * 作者：刘江飞
 * 时间：2020/10/14  14:42
 * 邮箱：642371742Z@qq.com
 * 描述：
 **/
public class WarehouseAdapter extends BaseQuickAdapter<WarehouseResponse, BaseViewHolder> {
    public WarehouseAdapter(int layoutResId) {
        super(layoutResId);
        addChildClickViewIds(R.id.tv_name);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, WarehouseResponse response) {
        if (response == null) {
            return;
        }

        TextView tv_name = baseViewHolder.getView(R.id.tv_name);

        tv_name.setText(response.name);
    }
}
